package controller

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"math/rand"
	"net/http"
)

func RoomGET(c *gin.Context) {
	fmt.Println("RooGet Controller ......")
	roomid := c.Param("roomid")
	userId := fmt.Sprintf(string(rand.Int31()))

	c.HTML(http.StatusOK, "chat/index.tmpl", gin.H{
		"title":  roomid,
		"userid": userId,
	})
}
